package com.shelpe.services.sinbad.entity.jpa;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat.Shape;
import com.shelpe.services.sinbad.controller.LogDto.LogNoteable;

import lombok.Data;

@Entity(name = "user_message_delivery")
@Data
public class Message implements LogNoteable {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "inform_id")
	private long informID;
	@Column(name = "user_id")
	private long userID;
	private String nick;
	@Column(name = "container_id")
	private long containerID;
	@Column(name = "container_type")
	private String type;
	@Column(name = "content")
	private String content;
	@JsonFormat(shape = Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	@Column(name = "last_modife_time")
	@JsonFormat(shape = Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
	private Date lastModifeTime;
	private int unread;
	@Column(name = "container_url")
	private String containerUrl;
	private String title;
	private String subType;
	@Column(name = "topics_id")
	private long topicsID; // message_topics表里的主键id
	@Column(name = "message_type")
	private String messageType = "";// 消息类型
}
